/**
 * 弹幕组件库主入口
 * 导出所有公共API
 */

// 🎯 开箱即用组件 - 完整的弹幕演示应用
export { default as BarrageDemoApp } from './BarrageDemoApp'

// 核心组件
export { BarrageRenderer } from './core/BarrageRenderer'
export { VideoBarrage } from './core/VideoBarrage'
export { default as VideoSelector } from './component/VideoSelector.tsx'
export { default as VideoDrawer } from './component/VideoDrawer.tsx'

// UI 组件
export { BarrageInput } from './component/BarrageInput.tsx'
export { ControlButtons } from './component/ControlButtons.tsx'
export { DetectionStatusMini } from './component/DetectionStatusMini.tsx'
export { StatusInfo } from './component/StatusInfo.tsx'

// 设置系统组件
export { SimpleSettingsButton } from './component/SimpleSettingsButton.tsx'

// React Hooks
export { useBarrage, useBarrageInput, useBarrageStats } from './hooks/useBarrage'
export { useBarrageConfig, DISPLAY_COUNT_PRESETS, TRACK_FILL_MODE_PRESETS } from './hooks/useBarrageConfig'
export { useVideoManager } from './hooks/useVideoManager'
export { useBarrageSettings } from './hooks/useBarrageSettings'

// 类型定义
export type {
  BarrageItem,
  BarrageConfig,
  BarrageEvents,
  VideoBarrageProps,
  BarrageRendererOptions,
  BarrageTrack,
  ActiveBarrage,
  DetectionArea,
  BarrageColor,
  BarrageSize,
  BarragePosition,
  BarrageAnimation,
  BarragePreset
} from './types'

// 设置系统类型
export type {
  BarrageSettings,
  FontSize,
  Opacity,
  Speed,
  DisplayArea,
  FontColorMode,
  SettingChangeEvent,
  SettingsPanelState,
  SettingPreset
} from './types/settings'

// 高级设置系统类型
export type {
  BarrageRenderConfig,
  BarrageTypeFilter,
  SmartBlockConfig,
  BarrageConfig as AdvancedBarrageConfig
} from './hooks/useBarrageConfig'

// 预设配置
export { 
  BARRAGE_PRESETS, 
  getPreset, 
  getPresetNames, 
  getAllPresets 
} from './types/presets'

// 工具函数
export {
  BARRAGE_COLORS,
  getRandomColor,
  generateBarrageId,
  createBarrage,
  validateBarrage,
  isValidColor,
  measureTextWidth,
  throttle,
  debounce,
  formatTime,
  isMobile,
  getDevicePixelRatio,
  BarrageFilter,
  BarrageStats
} from './utils'

// 纯蒙版功能
export {
  PureMaskController,
  PureMaskEngine,
  PureMaskVisualizer,
  PURE_MASK_PRESETS,
  PURE_MASK_VISUALIZER_PRESETS
} from './features/pure-mask'

export type {
  PureMaskConfig,
  PureMaskVisualizerStyle,
  PureMaskControllerOptions
} from './features/pure-mask'

// 视频管理相关类型和配置
export type { VideoItem } from './component/VideoSelector.tsx'
export type { 
  VideoCategory, 
  ExtendedVideoItem 
} from './config/videos'

export {
  PRESET_VIDEOS,
  DETECTED_VIDEOS,
  SUPPORTED_VIDEO_FORMATS,
  MAX_VIDEO_SIZE,
  VIDEO_CONFIG,
  VIDEO_CATEGORIES,
  getCategoryDisplayName,
  isVideoFormatSupported,
  isVideoSizeValid,
  getVideoFileError
} from './config/videos'

// 视频检测工具
export {
  detectVideosInPublicFolder,
  refreshVideoList,
  isVideoFile
} from './utils/videoDetector'

// MediaPipe Pose 功能
export {
  PoseDetectionService,
} from './features/mediapipe-pose/PoseDetectionService.ts'
export {
  MEDIAPIPE_ASSETS_BASE_URL,
  MEDIAPIPE_DEFAULTS,
  DEFAULT_POSE_DETECTION_CONFIG,
} from './config/mediapipe.ts'

export type {
  PoseDetectionState,
  PoseDetectionResult,
} from './features/mediapipe-pose/PoseDetectionService.ts'

export type {
  PoseDetectionConfig,
} from './config/mediapipe.ts'

// 测试场景
export {
  TestScenarioManager,
  allTestScenarios
} from './test/TestScenarios'

// API接口
export {
  BarrageAPI,
  VideoAPI,
  SystemAPI,
  CombinedAPI,
  ApiManager,
  ApiConfig,
  API_PRESETS,
  default as API
} from './api'

export type {
  ApiResponse,
  BarrageData,
  VideoData,
  BarrageStats as ApiBarrageStats,
  ApiEndpoints
} from './api'

// 默认导出
export { VideoBarrage as default } from './core/VideoBarrage'
